import { defineStore } from 'pinia'
import { reqGetReportInfoData } from '@/api/mock'
import { ElLoading } from 'element-plus'

export const useReportInfoData = defineStore({
  id: 'reportData',
  state: () => {
    return {
      reportData: {}
    }
  },
  actions: {
    async getReportInfoData() {
      const loading = ElLoading.service({
        lock: true,
        text: 'Loading......',
        background: 'rgba(0, 0, 0, .7)'
      })
      const res = await reqGetReportInfoData()
      this.reportData = res
      loading.close()
    }
  }
})
